package prvydevw.entity;

/**
 *
 * @author ivo
 */
public class Subject
{
    private Long id;
    private String name;
    private String regId;
    private String accountNumber;

    /**
     * @return the id
     */
    public Long getId()
    {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id)
    {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName()
    {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name)
    {
        this.name = name;
    }

    /**
     * @return the regId
     */
    public String getRegId()
    {
        return regId;
    }

    /**
     * @param regId the regId to set
     */
    public void setRegId(String regId)
    {
        this.regId = regId;
    }

    /**
     * @return the accountNumber
     */
    public String getAccountNumber()
    {
        return accountNumber;
    }

    /**
     * @param accountNumber the accountNumber to set
     */
    public void setAccountNumber(String accountNumber)
    {
        this.accountNumber = accountNumber;
    }
    
    @Override
    public String toString()
    {
        return "Subject{ id=" + id + "; name=" + name + "}";
    }

    @Override
    public boolean equals(Object obj)
    {
        if (obj == null) {
            return false;
        }
        
        if (getClass() != obj.getClass()) {
            return false;
        }
        
        final Subject other = (Subject) obj;
        
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        
        return true;
    }

    @Override
    public int hashCode()
    {
        int hash = 7;
        
        hash = 97 * hash + (this.id != null ? this.id.hashCode() : 0);
        
        return hash;
    }
}
